package com.heima.controller;

import com.heima.pojo.vo.StatusVmVo;
import com.heima.pojo.vo.VendingMachineVo;
import com.heima.service.StatusVmService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
public class StatusController {

    @Autowired
    private StatusVmService statusVmService;

    /**
     * 查询10个异常设备
     */
    @GetMapping("/api/status-service/status/top10")
    public List<StatusVmVo> queryStatusVm(){
       return statusVmService.queryStatusVm();
    }
}
